<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Biometric Embedded Platform: util_interface/inc/fpc_log.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Biometric Embedded Platform
   &#160;<span id="projectnumber">fpc_bep_kaadas_21.0.1.002</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('fpc__log_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">fpc_log.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Debug log of text and data for an embedded application.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="fpc__log__config_8h_source.html">fpc_log_config.h</a>&quot;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stddef.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
</div>
<p><a href="fpc__log_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a74c002a00ca396ca0ac0112469d429a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a74c002a00ca396ca0ac0112469d429a7">fpc_log_printf</a>(format, ...)</td></tr>
<tr class="memdesc:a74c002a00ca396ca0ac0112469d429a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Printf-like utility macro(s) to create a debug log. The source of the log record will be the name of the calling function. The log level classification will be "debug" or "error", for printf and printfe respectively. The macro handles message truncation. I.e. the caller need not worry about buffer overflow.  <a href="#a74c002a00ca396ca0ac0112469d429a7">More...</a><br /></td></tr>
<tr class="separator:a74c002a00ca396ca0ac0112469d429a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fb7155f1201ef1aa4f31eca33d125cf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a6fb7155f1201ef1aa4f31eca33d125cf">fpc_log_printfe</a>(format, ...)</td></tr>
<tr class="memdesc:a6fb7155f1201ef1aa4f31eca33d125cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Printf-like utility macro(s) to create a debug log. The source of the log record will be the name of the calling function. The log level classification will be "debug" or "error", for printf and printfe respectively. The macro handles message truncation. I.e. the caller need not worry about buffer overflow.  <a href="#a6fb7155f1201ef1aa4f31eca33d125cf">More...</a><br /></td></tr>
<tr class="separator:a6fb7155f1201ef1aa4f31eca33d125cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a02649358843828935cdb6842c4786cf8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8">fpc_log_level_t</a> { <br />
&#160;&#160;<a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8a250c6c23e107e9d063c2e438bac5ec9e">FPC_LOG_LEVEL_ALERT</a> = 0, 
<br />
&#160;&#160;<a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8a187a52023d07343422fb64758928c56e">FPC_LOG_LEVEL_ERROR</a> = 1, 
<br />
&#160;&#160;<a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8a2e5ca065e41a05d4f361e59693b8b012">FPC_LOG_LEVEL_WARNING</a> = 2, 
<br />
&#160;&#160;<a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8aa25106f13a54ad5cac7e3f8047d2e031">FPC_LOG_LEVEL_INFO</a> = 3, 
<br />
&#160;&#160;<a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8ad2d790c3a327b4d74dfe7b76e626b5ee">FPC_LOG_LEVEL_DEBUG</a> = 4, 
<br />
&#160;&#160;<b>FPC_LOG_LEVEL_LAST</b> = 4
<br />
 }<tr class="memdesc:a02649358843828935cdb6842c4786cf8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log severity level classification.  <a href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a02649358843828935cdb6842c4786cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af62f5a2df26ad9118d4ecfe0e4f95e74"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#af62f5a2df26ad9118d4ecfe0e4f95e74">fpc_log</a> (const char *source, uint8_t level, const char *message)</td></tr>
<tr class="memdesc:af62f5a2df26ad9118d4ecfe0e4f95e74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a debug log.  <a href="#af62f5a2df26ad9118d4ecfe0e4f95e74">More...</a><br /></td></tr>
<tr class="separator:af62f5a2df26ad9118d4ecfe0e4f95e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada35d6414ace89b3bfc03b6239a5310f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#ada35d6414ace89b3bfc03b6239a5310f">fpc_log_var</a> (const char *source, uint8_t level, const char *format,...)</td></tr>
<tr class="memdesc:ada35d6414ace89b3bfc03b6239a5310f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a debug log.  <a href="#ada35d6414ace89b3bfc03b6239a5310f">More...</a><br /></td></tr>
<tr class="separator:ada35d6414ace89b3bfc03b6239a5310f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02d3f57f5c1189fc6127a9da9520f795"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a02d3f57f5c1189fc6127a9da9520f795">fpc_log_mem</a> (const char *source, uint8_t level, const char *message, const uint8_t *data, size_t len)</td></tr>
<tr class="memdesc:a02d3f57f5c1189fc6127a9da9520f795"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a debug log.  <a href="#a02d3f57f5c1189fc6127a9da9520f795">More...</a><br /></td></tr>
<tr class="separator:a02d3f57f5c1189fc6127a9da9520f795"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4734cb198515843ba77e053a24fa1085"><td class="memItemLeft" align="right" valign="top"><a id="a4734cb198515843ba77e053a24fa1085"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a4734cb198515843ba77e053a24fa1085">fpc_log_flush</a> (void)</td></tr>
<tr class="memdesc:a4734cb198515843ba77e053a24fa1085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits until all logs have been written to external interface. <br /></td></tr>
<tr class="separator:a4734cb198515843ba77e053a24fa1085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a519b8eaa6b25c56e188fdf73a0518baa"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a519b8eaa6b25c56e188fdf73a0518baa">fpc_log_level_get</a> (void)</td></tr>
<tr class="memdesc:a519b8eaa6b25c56e188fdf73a0518baa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current log level restriction.  <a href="#a519b8eaa6b25c56e188fdf73a0518baa">More...</a><br /></td></tr>
<tr class="separator:a519b8eaa6b25c56e188fdf73a0518baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab823ceec83eea8b3190cb76f6fd4c3d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#ab823ceec83eea8b3190cb76f6fd4c3d6">fpc_log_level_set</a> (uint8_t level)</td></tr>
<tr class="memdesc:ab823ceec83eea8b3190cb76f6fd4c3d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set log level restriction.  <a href="#ab823ceec83eea8b3190cb76f6fd4c3d6">More...</a><br /></td></tr>
<tr class="separator:ab823ceec83eea8b3190cb76f6fd4c3d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af49f45adc9877c0befef6b3af1b13ccf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#af49f45adc9877c0befef6b3af1b13ccf">fpc_log_init</a> (uint8_t level)</td></tr>
<tr class="memdesc:af49f45adc9877c0befef6b3af1b13ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the log component.  <a href="#af49f45adc9877c0befef6b3af1b13ccf">More...</a><br /></td></tr>
<tr class="separator:af49f45adc9877c0befef6b3af1b13ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b1d0fba8956f574a4a8ec29e170ab05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fpc__log_8h.html#a0b1d0fba8956f574a4a8ec29e170ab05">fpc_log_diag</a> (const char *str)</td></tr>
<tr class="memdesc:a0b1d0fba8956f574a4a8ec29e170ab05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output string to diagnostic/trace interface.  <a href="#a0b1d0fba8956f574a4a8ec29e170ab05">More...</a><br /></td></tr>
<tr class="separator:a0b1d0fba8956f574a4a8ec29e170ab05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Debug log of text and data for an embedded application. </p>
<p>This is the interface of a debug log component. The services provided are:</p><ul>
<li>Log numbering</li>
<li>Log timestamping</li>
<li>Log filtering</li>
<li>Consistent log formatting with buffer overflow checks</li>
<li>Execution decoupling from HW interface output (non-blocking)</li>
<li>Log queueing with controlled overwrite at full queue</li>
<li>Controlled shutdown awaiting HW interface output completed (blocking)</li>
<li>Modest RAM usage by late expansion of text strings, where viable</li>
<li>Conditional inclusion of log functions </li>
</ul>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a74c002a00ca396ca0ac0112469d429a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74c002a00ca396ca0ac0112469d429a7">&#9670;&nbsp;</a></span>fpc_log_printf</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define fpc_log_printf</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">format, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{                                                                                  \</div><div class="line">    char fpc_log_buf[<a class="code" href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a>];                                    \</div><div class="line">                                                                                   \</div><div class="line">    (void)snprintf(fpc_log_buf, <a class="code" href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a>, format, ##__VA_ARGS__);  \</div><div class="line">    fpc_log_var(__func__, <a class="code" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8ad2d790c3a327b4d74dfe7b76e626b5ee">FPC_LOG_LEVEL_DEBUG</a>, fpc_log_buf);                       \</div><div class="line">}</div><div class="ttc" id="fpc__log__config_8h_html_ac63c6a2dd2a7699037e7e26a6a17ebfe"><div class="ttname"><a href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a></div><div class="ttdeci">#define FPC_LOG_MAX_MESSAGE_SIZE</div><div class="ttdef"><b>Definition:</b> fpc_log_config.h:53</div></div>
<div class="ttc" id="fpc__log_8h_html_a02649358843828935cdb6842c4786cf8ad2d790c3a327b4d74dfe7b76e626b5ee"><div class="ttname"><a href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8ad2d790c3a327b4d74dfe7b76e626b5ee">FPC_LOG_LEVEL_DEBUG</a></div><div class="ttdef"><b>Definition:</b> fpc_log.h:67</div></div>
</div><!-- fragment -->
<p>Printf-like utility macro(s) to create a debug log. The source of the log record will be the name of the calling function. The log level classification will be "debug" or "error", for printf and printfe respectively. The macro handles message truncation. I.e. the caller need not worry about buffer overflow. </p>
<p>NOTE Will allocate FPC_LOG_MAX_MESSAGE_SIZE bytes on the caller's stack. </p>

</div>
</div>
<a id="a6fb7155f1201ef1aa4f31eca33d125cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fb7155f1201ef1aa4f31eca33d125cf">&#9670;&nbsp;</a></span>fpc_log_printfe</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define fpc_log_printfe</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">format, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{                                                                                  \</div><div class="line">    char fpc_log_buf[<a class="code" href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a>];                                    \</div><div class="line">                                                                                   \</div><div class="line">    (void)snprintf(fpc_log_buf, <a class="code" href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a>, format, ##__VA_ARGS__);  \</div><div class="line">    fpc_log_var(__func__, <a class="code" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8a187a52023d07343422fb64758928c56e">FPC_LOG_LEVEL_ERROR</a>, fpc_log_buf);                       \</div><div class="line">}</div><div class="ttc" id="fpc__log__config_8h_html_ac63c6a2dd2a7699037e7e26a6a17ebfe"><div class="ttname"><a href="fpc__log__config_8h.html#ac63c6a2dd2a7699037e7e26a6a17ebfe">FPC_LOG_MAX_MESSAGE_SIZE</a></div><div class="ttdeci">#define FPC_LOG_MAX_MESSAGE_SIZE</div><div class="ttdef"><b>Definition:</b> fpc_log_config.h:53</div></div>
<div class="ttc" id="fpc__log_8h_html_a02649358843828935cdb6842c4786cf8a187a52023d07343422fb64758928c56e"><div class="ttname"><a href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8a187a52023d07343422fb64758928c56e">FPC_LOG_LEVEL_ERROR</a></div><div class="ttdef"><b>Definition:</b> fpc_log.h:52</div></div>
</div><!-- fragment -->
<p>Printf-like utility macro(s) to create a debug log. The source of the log record will be the name of the calling function. The log level classification will be "debug" or "error", for printf and printfe respectively. The macro handles message truncation. I.e. the caller need not worry about buffer overflow. </p>
<p>NOTE Will allocate FPC_LOG_MAX_MESSAGE_SIZE bytes on the caller's stack. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a02649358843828935cdb6842c4786cf8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02649358843828935cdb6842c4786cf8">&#9670;&nbsp;</a></span>fpc_log_level_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8">fpc_log_level_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Log severity level classification. </p>
<p>This is a generic classification of debug logs. Some guidelines for use are given below. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a02649358843828935cdb6842c4786cf8a250c6c23e107e9d063c2e438bac5ec9e"></a>FPC_LOG_LEVEL_ALERT&#160;</td><td class="fielddoc"><p>An event that may indicate permanent loss of function. Example: Failed initialization of device. </p>
</td></tr>
<tr><td class="fieldname"><a id="a02649358843828935cdb6842c4786cf8a187a52023d07343422fb64758928c56e"></a>FPC_LOG_LEVEL_ERROR&#160;</td><td class="fielddoc"><p>An serious event that is believed to be corrected by program restart. Example: Program functional supervision triggered. </p>
</td></tr>
<tr><td class="fieldname"><a id="a02649358843828935cdb6842c4786cf8a2e5ca065e41a05d4f361e59693b8b012"></a>FPC_LOG_LEVEL_WARNING&#160;</td><td class="fielddoc"><p>An event that is probably caused from outside, but may indicate a problem. Example: Unexpected loss of communication with peer node. </p>
</td></tr>
<tr><td class="fieldname"><a id="a02649358843828935cdb6842c4786cf8aa25106f13a54ad5cac7e3f8047d2e031"></a>FPC_LOG_LEVEL_INFO&#160;</td><td class="fielddoc"><p>An event that is expected but important enough to be part of a verbose log. Example: Program restarted. </p>
</td></tr>
<tr><td class="fieldname"><a id="a02649358843828935cdb6842c4786cf8ad2d790c3a327b4d74dfe7b76e626b5ee"></a>FPC_LOG_LEVEL_DEBUG&#160;</td><td class="fielddoc"><p>Free for arbitrary use. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="af62f5a2df26ad9118d4ecfe0e4f95e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af62f5a2df26ad9118d4ecfe0e4f95e74">&#9670;&nbsp;</a></span>fpc_log()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a debug log. </p>
<p>Puts a log record on queue for write to external interface. Asynchronous.</p>
<p>Used for log of fixed message, without parameters. Descriptions of this function (including parameters) is valid also for other fpc_log variants, where not refined.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Source of log record as a null terminated string. E.g. name of reporting component. <em>Must</em> be a constant string that is not altered during program execution. The log component will truncate logged string controlled by FPC_LOG_MAX_SOURCE_SIZE. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>Log level classification. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>Log text as null terminated string. <em>Must</em> be a constant string that is not altered during program execution The log component will truncate logged string controlled by FPC_LOG_MAX_MESSAGE_SIZE.</td></tr>
  </table>
  </dd>
</dl>
<p>Example use: fpc_log("fpc_sensor", FPC_LOG_LEVEL_ALERT, "Failed to read out ASIC id"); </p>

</div>
</div>
<a id="a0b1d0fba8956f574a4a8ec29e170ab05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b1d0fba8956f574a4a8ec29e170ab05">&#9670;&nbsp;</a></span>fpc_log_diag()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log_diag </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Output string to diagnostic/trace interface. </p>
<p>This function sends a string to a suitable diagnostic/trace HW interface (ie ITM/UART) It's used in bep lib for the trace and diagnostic functionality and is required when using the diagnostic lib.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>String to send. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af49f45adc9877c0befef6b3af1b13ccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af49f45adc9877c0befef6b3af1b13ccf">&#9670;&nbsp;</a></span>fpc_log_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log_init </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the log component. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>Initial log level restriction. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a519b8eaa6b25c56e188fdf73a0518baa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a519b8eaa6b25c56e188fdf73a0518baa">&#9670;&nbsp;</a></span>fpc_log_level_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t fpc_log_level_get </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current log level restriction. </p>
<dl class="section return"><dt>Returns</dt><dd>Current log level. </dd></dl>

</div>
</div>
<a id="ab823ceec83eea8b3190cb76f6fd4c3d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab823ceec83eea8b3190cb76f6fd4c3d6">&#9670;&nbsp;</a></span>fpc_log_level_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log_level_set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set log level restriction. </p>
<p>Restricts log output based on log level. Log records with severity less than specified log level will be discarded. The log level severity is classified in <a class="el" href="fpc__log_8h.html#a02649358843828935cdb6842c4786cf8" title="Log severity level classification. ">fpc_log_level_t</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td>Requested log level restriction. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a02d3f57f5c1189fc6127a9da9520f795"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02d3f57f5c1189fc6127a9da9520f795">&#9670;&nbsp;</a></span>fpc_log_mem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log_mem </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a debug log. </p>
<p>Used for log of fixed message with memory data of variable length. Memory data is written as hex dump in log.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">message</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Memory data. May be NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of user memory data. Ignored if data is NULL. The log component will truncate logged hex dump controlled by FPC_LOG_MAX_DATA_SIZE. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ada35d6414ace89b3bfc03b6239a5310f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada35d6414ace89b3bfc03b6239a5310f">&#9670;&nbsp;</a></span>fpc_log_var()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fpc_log_var </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a debug log. </p>
<p>Used for log of message that may be variable (e.g. placed on stack) and for printf-like formatting of log messages. The function handles message truncation. I.e. the caller need not worry about buffer overflow. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">level</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>Log text that may be altered during program execution and that may include printf format directives (%). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>Optional parameters for formatting. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_e79ca706d7b7812879449353d775bd0b.html">util_interface</a></li><li class="navelem"><a class="el" href="dir_72f071488693276058f6a6f76e473674.html">inc</a></li><li class="navelem"><a class="el" href="fpc__log_8h.html">fpc_log.h</a></li>
    <li class="footer">Generated on Tue Nov 9 2021 12:12:59 for Biometric Embedded Platform by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
